<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    //无参无返回值
    function fn1() {
alert("fn1")
    }
    //调用方法
    fn1();
    //有参无返回值
    function fn2(name,age) {
alert(name+":"+age);
    }
    fn2("张飞",18);
    //无参有返回值
    function fn3(){
        return"我是返回值";
    }


    //第三种声明方法的方式
    let fn6=new Function ("name","age","alert(name+':'+age)");
    fn6("关羽","25")
</script>
</body>
</html>